package define

import "time"

const (
	GamePlayerStayTime = 10 * time.Minute
	PlayerStayTime     = GamePlayerStayTime + 20*time.Minute // 用户在在线时间必须比游戏长
	BusinessStayTime   = 1 * time.Hour
	JackpotStayTime    = 60 * time.Hour
	RecorderStayTime   = 30 * time.Minute
)

const (
	BagTypeScore    = iota + 1 // 积分用户
	BagTypeSeamless            // 无缝积分用户
)

const (
	DotCtrlOpFromUnknown = iota
	DotCtrlOpFromBack
	DotCtrlOpFromAuto
	DotCtrlOpFromAlarm
)

const (
	TokenLen          = 31
	IpLen             = 48
	AccountLen        = 31
	PassLen           = 31
	EmailLen          = 31
	NickNameLen       = 15
	OrderLen          = 63
	GameLogLen        = 31
	PlayerInfoLen     = 1023
	GameInfoLen       = (1024 * 4) - 1
	TableNameLen      = 31
	PlayerCtrlJsonLen = 2047
	AutoCtrlJsonLen   = 4095
)

const (
	HttpActionName = "action"      // 执行命令ID
	BackActionName = "back_action" // 后台执行命令ID

	WebBusinessId = "bid" // 商人ID
	WebAccount    = "account"
	WebUserId     = "uid" // 玩家ID
	WebAdminId    = "admin_id"
	WebScoreType  = "score_type"
	WebLang       = "lang"
	WebGameKind   = "game_kind"
	WebGuest      = "guest"
	WebToken      = "token"
	WebBeginTime  = "b_time"
	WebEndTime    = "e_time"
	WebPageSize   = "page_size"
	WebPage       = "page"
	WebLogID      = "log_id"
	WebTimeStamp  = "timestamp"
)

const (
	RedisTokenTTL = 30 * time.Minute
	RedisTTL      = 36 * time.Hour
)

const (
	CtrlEatLv1   CtrlLevelType = 1    // 正常吃分
	CtrlSptLv1   CtrlLevelType = -1   // 正常放分
	CtrlEatLv2   CtrlLevelType = 2    // 加速吃分
	CtrlSptLv2   CtrlLevelType = -2   // 加速放分
	CtrlEatLv3   CtrlLevelType = 3    // 极速吃分
	CtrlSptLv3   CtrlLevelType = -3   // 极速放分
	CtrlEatForce CtrlLevelType = 100  // 强制吃分
	CtrlSptForce CtrlLevelType = -100 // 强制放分
)

var CtrlLvStr = map[CtrlLevelType]string{
	CtrlEatLv1:   "吃分(E.Lv1)",
	CtrlSptLv1:   "放分(S.Lv1)",
	CtrlEatLv2:   "快吃(E.Lv2)",
	CtrlSptLv2:   "快放(S.Lv2)",
	CtrlEatLv3:   "极吃(E.Lv3)",
	CtrlSptLv3:   "极放(S.Lv3)",
	CtrlEatForce: "强吃(E.Lv100)",
	CtrlSptForce: "强放(S.Lv100)",
}

var CtrlTagStr = map[CtrlLevelType]string{
	CtrlEatLv3: "EatLv3",
	CtrlEatLv2: "EatLv2",
	CtrlEatLv1: "EatLv1",
	CtrlSptLv1: "SptLv1",
	CtrlSptLv2: "SptLv2",
	CtrlSptLv3: "SptLv3",
}

const (
	CtrlLevelCount = 6
)

const (
	Rate1K   = 1000
	Rate10K  = 10000
	Rate100K = 100000
)

const (
	RTPBase = 10000
)

const (
	CloseAble = 1 << iota
	FreeAble
)
